﻿using System;
using System.Collections.Generic;
using System.Text;
using DailyDiet.Services.Constant;

namespace DailyDiet.Models
{
    public class FeedbackObject
    {
        public int Id { set; get; }
        public string Context {
            get;
            set;
        }

        public string IndexKey {
            get;
            set;
        }

        public int Index {
            get;
            set;
        }
        
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(obj, null)) return false;
            if (ReferenceEquals(this, obj)) return true;
            var o = obj as FeedbackObject;
            if (o.Id == null || this.Id == null) {
                return false;
            }
            return o.Id == this.Id;
        }
    }

    public static class FeedBackObjectConstant {
        public static FeedbackObject SoSweetFeedback = new FeedbackObject() {
            Id=1,
            Context = "过于甜了",
            IndexKey = TasteSetConstant.SweetIndexKey,
            Index = -10
        };
        public static FeedbackObject SoSpicyFeedback = new FeedbackObject()
        {
            Id = 2,
            Context = "有点辣",
            IndexKey = TasteSetConstant.SpicyIndexKey,
            Index = -10
        };
        public static FeedbackObject SoFatFeedback = new FeedbackObject()
        {
            Id = 3,
            Context = "太油了",
            IndexKey = TasteSetConstant.HealthIndexKey,
            Index = 10
        };
        public static FeedbackObject NotFavoriteFeedback = new FeedbackObject()
        {
            Id = 4,
            Context = "不喜欢",
            IndexKey = TasteSetConstant.TasteIndexKey,
            Index = +10
        };
    }
}
